<?php
namespace App\Traits;

trait SingletonTrait{
    private static $_instance;

    public static function getInstance(...$args)
    {
        if (!self::$_instance instanceof self) {
            self::$_instance = new self(...$args);
        }
        return self::$_instance;
    }

}
